flist = []
cnt = 0
while 1:
    f = open('test.txt', 'r')
    flist.append(f)
    cnt += 1
    f.close()
    print(f'打开了{cnt}个文件')